#ifndef _SASTE_LOOP_INPUT_CPP_
#define _SASTE_LOOP_INPUT_CPP_

void Input::beginLoop()
{
    tcgetattr(STDIN_FILENO, &oldt);
    newt = oldt;
    newt.c_lflag &= ~(ICANON | ECHO | ISIG);
    tcsetattr(STDIN_FILENO, TCSANOW, &newt);
}

void Input::endLoop()
{
    tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
}

int Input::getEventCode()
{
    return getchar();
}

#endif
